package com.baizhi.service.impl;

import com.baizhi.dao.UserDao;
import com.baizhi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;


    @Override
    public void addUser() {
        userDao.insertUser();
    }

    @Override
    public void addUser(int id, String name) {
        System.out.println("重载的方法两个参数");
    }

    @Override
    public void addUser(int id, String name, int age) {
        System.out.println("重载三个参数");
    }

    @Override
    public void addUser(int id, String name, int age, String address) {
        System.out.println("重载四个参数");
    }

    @Override
    public void removeUser() {

        userDao.deleteUserById();
    }

    @Override
    public void updateUser() {

        userDao.updateUserById();
    }

    @Override
    public void findUser() {
        userDao.selectAllUser();
    }

    @Override
    public void findUserById() {
        userDao.selectUserById();
    }
}
